package com.cvicse.jrcompetition01.entity;

import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 *
 * </p>
 *
 * @author 作者:kissshotwang@163.com
 * @since 2022-07-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class Mechanism extends BaseEntity implements Comparable<Mechanism>{

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "机构类型不能为空")
    private String mechanismType;

    private String mechanismNumber;

    @NotBlank(message = "机构名称不能为空")
    private String mechanismName;

    private String mechanismStatu;

    @TableField("USCCL")
    private String usccl;

    private String validity;

    private String legalRepresentative;

    private String hostDepartment;

    private Integer visit;

    private Integer visitedTime;

    private LocalDate created;

    private String registereAddress;

    private String businessAddress;


    @Override
    public int compareTo(Mechanism o) {
        return this.created.compareTo(o.getCreated());
    }
}
